<div class="row" ng-hide="$ctrl.hideTree == 'true'">
    <div class="col-sm-3">
        <div class="input-group">
            <select class="form-control" ng-model="$ctrl.sltSysItem" ng-options="sys.key for sys in $ctrl.sysData" ng-change="$ctrl.selectChange()"></select>
        </div>
    </div>
    <div class="col-sm-9" ng-if="$ctrl.my_data.length > 0">
        <div class="input-group">
            <input type="text" class="form-control" placeholder="请输入关键字..." ng-model="$ctrl.filterText.Keyword" name="">
            <span class="input-group-addon" ng-click="$ctrl.searchNextItem()" title="点击搜索下一节点内容"><i class="fa fa-level-down"></i></span>
        </div>
    </div>
</div>
<div class="row col-sm-12" ng-if="$ctrl.my_data.length <= 0" ng-hide="$ctrl.hideTree == 'true'">
    <div class="alert alert-warning" role="alert">
        当前系统下数据为空！请切换其他系统操作。
    </div>
</div>
<div class="row" style="margin-bottom: -15px; height: 35px;" ng-if="$ctrl.my_data.length > 0" ng-hide="$ctrl.hideTree == 'true'">
    <div class="col-sm-12">
        <button class="btn btn-default btn-sm"
                ng-click="$ctrl.addMenuBranch()"
                ng-if="!$ctrl.showAddMenu"
                title="添加">
                <i class="fa fa-plus" aria-hidden="true"> M</i> 
        </button>
        <button class="btn btn-default btn-sm"
                ng-click="$ctrl.updateMenuBranch()"
                ng-if="!$ctrl.showDeleteMenu"
                title="修改">
                <i class="fa fa-pencil-square-o" aria-hidden="true"> M</i> 
        </button>
        <button class="btn btn-default btn-sm"
                ng-click="$ctrl.deleteMenuBranch()"
                ng-if="!$ctrl.showDeleteMenu"
                title="删除">
                <i class="fa fa-minus" aria-hidden="true"> M</i> 
        </button>
        <button class="btn btn-default btn-sm"
                ng-click="$ctrl.addPageBranch()"
                ng-if="!$ctrl.showAddPage"
                title="添加">
                <i class="fa fa-plus" aria-hidden="true"> P</i> 
        </button>
        <button class="btn btn-default btn-sm"
                ng-click="$ctrl.updatePageBranch()"
                ng-if="!$ctrl.showDeletePage"
                title="修改">
                <i class="fa fa-pencil-square-o" aria-hidden="true"> P</i> 
        </button>
        <button class="btn btn-default btn-sm"
                ng-click="$ctrl.deletePageBranch()"
                ng-if="!$ctrl.showDeletePage"
                title="删除">
                <i class="fa fa-minus" aria-hidden="true"> P</i> 
        </button>
        <button class="btn btn-default btn-sm"
                ng-click="$ctrl.addFeatureBranch();"
                ng-if="!$ctrl.showAddFeature"
                title="添加">
                <i class="fa fa-plus" aria-hidden="true"> F</i> 
        </button>
        <button class="btn btn-default btn-sm"
                ng-click="$ctrl.updatePanel()"
                ng-if="!$ctrl.showEditFeature"
                title="拉分支">
                <i class="fa fa-code-fork" aria-hidden="true"></i> 
        </button>
        <button class="btn btn-default btn-sm"
                ng-click="$ctrl.deleteBranch()"
                ng-if="!$ctrl.showDeleteBtn"
                title="删除节点">
                <i class="fa fa-trash-o" aria-hidden="true"></i> 
        </button>
        <button class="btn btn-default btn-sm"
                ng-click="$ctrl.disassociation()"
                ng-if="!$ctrl.showRelateBtn"
                title="重置">
                <i class="fa fa-chain-broken" aria-hidden="true"></i>
        </button>
    </div>
</div>
<div style="max-height: 550px; overflow: auto;" ng-if="$ctrl.my_data.length > 0" ng-hide="$ctrl.hideTree == 'true'">
    <abn-tree
            tree-data='$ctrl.my_data'
            tree-control='$ctrl.my_tree'
            on-select='$ctrl.my_tree_handler(branch)'
            expand-level='2'
            icon-leaf='fa fa-file-o'
            icon-expand='fa fa-plus'
            icon-collapse='fa fa-minus'
            is-status='$ctrl.treeOperation'
            filterby='$ctrl.filterText'
            type='$ctrl.treeType'
            req-id='$ctrl.reqId'
            tree-status='{{$ctrl.treeStatus}}'>
    </abn-tree>
</div>
<div style="min-height: 150px; margin-top: 15px;" ng-if="$ctrl.my_data.length > 0">
    <div class="panel panel-info" ng-if="$ctrl.reqList.length > 0">
        <div class="panel-heading">
            关联列表&nbsp;&nbsp;&nbsp;
            <b class="badge bg-success">已关联：{{$ctrl.reqList.length}}</b>
        </div>
        <div class="list-group bg-white">
            <div class="col-sm-12 list-group-item" ng-repeat="(key, feature) in $ctrl.reqList" ng-click="$ctrl.goTo(feature.originalPageId, feature.id, feature.sys, $ctrl.sltSysItem)">
                <span ng-if="feature.type == 'PROTOTYPE'" title="{{feature.path}}">
                    {{key + 1}}.&nbsp;&nbsp;&nbsp; ...{{feature.path | limitTo: -8 }}
                </span>
                <span ng-if="feature.type != 'PROTOTYPE'" title="{{feature.path}}/{{feature.featureName}}">
                    {{key + 1}}.&nbsp;&nbsp;&nbsp; ...{{feature.path + '/'+feature.featureName| limitTo: -8 }}
                </span>
                <span class="pull-right">
                    <span class="label bg-success pull-right" ng-if="feature.status == 'ADD'">新增</span>
                    <span class="label bg-danger pull-right" ng-if="feature.status == 'UPDATE'">修改</span>
                    <span class="label bg-dark pull-right" ng-if="feature.status == 'DELETE'">删除</span>
                    <span class="label bg-primary pull-right" style="margin-right: 5px;">{{getFeatureSysSimple(feature.sys)}}</span>
                    <span class="label bg-primary pull-right" style="margin-right: 10px;" ng-if="feature.type == 'PROTOTYPE'">P</span>
                    <span class="label bg-primary pull-right" style="margin-right: 10px;" ng-if="feature.type != 'PROTOTYPE'">F</span>
                </span>
            </div>
        </div>
    </div>
</div>